//
//  REHelpFirstTableViewCell.m
//  录音
//
//  Created by ywy on 2016/12/23.
//  Copyright © 2016年 Wely. All rights reserved.
//

#import "REHelpFirstTableViewCell.h"

@implementation REHelpFirstTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.dataArr = [NSMutableArray new];
//    self.firstProblem.layer.borderColor = [UIColor lightGrayColor].CGColor;
    self.firstProblem.layer.masksToBounds = NO;
    //设置阴影的颜色
    self.firstProblem.layer.shadowColor=RERGBColor(225, 225, 225).CGColor;
        //设置阴影的偏移量，如果为正数，则代表为往右边偏移
    self.firstProblem.layer.shadowOffset=CGSizeMake(1, 1);
        //设置阴影的透明度(0~1之间，0表示完全透明)
    self.firstProblem.layer.shadowOpacity=0.5;
//    self.twoProble.layer.borderColor = [UIColor lightGrayColor].CGColor;
    self.twoProble.layer.masksToBounds = NO;
    //设置阴影的颜色
    self.twoProble.layer.shadowColor=RERGBColor(225, 225, 225).CGColor;
    //设置阴影的偏移量，如果为正数，则代表为往右边偏移
    self.twoProble.layer.shadowOffset=CGSizeMake(1, 1);
    //设置阴影的透明度(0~1之间，0表示完全透明)
  self.twoProble.layer.shadowOpacity=0.5;
    //    self.twoProble.layer.borderColor = [UIColor lightGrayColor].CGColor;
     self.threeProblem.layer.masksToBounds = NO;
    //设置阴影的颜色
      self.threeProblem.layer.shadowColor=RERGBColor(225, 225, 225).CGColor;
    //设置阴影的偏移量，如果为正数，则代表为往右边偏移
     self.threeProblem.layer.shadowOffset=CGSizeMake(1, 1);
    //设置阴影的透明度(0~1之间，0表示完全透明)
      self.threeProblem.layer.shadowOpacity=0.5;
    self.fourProblem.layer.masksToBounds = NO;
    //设置阴影的颜色
    self.fourProblem.layer.shadowColor=RERGBColor(225, 225, 225).CGColor;
    //设置阴影的偏移量，如果为正数，则代表为往右边偏移
   self.fourProblem.layer.shadowOffset=CGSizeMake(1, 1);
    //设置阴影的透明度(0~1之间，0表示完全透明)
    self.fourProblem.layer.shadowOpacity=0.5;
    
    UITapGestureRecognizer * tapFirst = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapView:)];
    [self.firstProblem addGestureRecognizer:tapFirst];
    UITapGestureRecognizer * tapTWo = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapView:)];
    [self.twoProble addGestureRecognizer:tapTWo];
    UITapGestureRecognizer * tapThree = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapView:)];
    [self.threeProblem addGestureRecognizer:tapThree];
    UITapGestureRecognizer * tapFour = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapView:)];
    [self.fourProblem addGestureRecognizer:tapFour];

    
    // Initialization code
}
-(void)tapView:(UITapGestureRecognizer*)tap
{
    if (_problemsClick) {
        if (_dataArr.count) {
            REquestion * model    =  _dataArr[tap.view.tag-1001];
            _problemsClick(tap.view.tag,model);
        }else
        {
                _problemsClick(tap.view.tag,nil);
        }
    }
}
-(void)showdata:(NSMutableArray*)arr
{
    _dataArr = arr;
    
    REquestion * model = arr[0];
    self.firstLabel.text = model.questionName;
    REquestion * modelTwo = arr[1];
    self.twoLabel.text = modelTwo.questionName;
    REquestion * modeltThree = arr[2];
    self.threeLabel.text = modeltThree.questionName;
    REquestion * modelFour = arr[3];
    self.fourLabel.text = modelFour.questionName;

    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
